﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.PopulationTriggers {
    import flash.utils.*;

    public class PopulationTriggerFactory {

        public static var populationTriggerClasses:Array = [AnnouncementTrigger, ManualQuestTrigger];

        public static function createPopulationTrigger(_arg1:XML):IPopulationTrigger{
            var triggerClass:* = null;
            var xml:* = _arg1;
            var trigger:* = null;
            if (!xml.@className){
                return (null);
            };
            try {
                triggerClass = (getDefinitionByName(("Classes.PopulationTriggers." + String(xml.@className))) as Class);
                if (!triggerClass){
                    return (null);
                };
                trigger = new triggerClass(xml);
            } catch(e:Error) {
            };
            return (trigger);
        }

    }
}//package Classes.PopulationTriggers 
